<?php
/**
 * Data structure representing a name-column pair.
 * 
 * @package junction.core
 */
class Junction_Builder_Property {

	/**
	 * @var String the application name of the property -- what the application will use to refer to the column. 
	 */
	public $name;
	
	/**
	 * @var String the database name of the property -- the column's name.
	 */
	public $column;
	
	/**
	 * Construct a new property which associates the given name and column.
	 *
	 * @param array $attributes an array with an index name and (optional) column.
	 */
	public function __construct(array $attributes) {
		$this->name = $attributes["name"];
		$this->column = (isset($attributes["column"])) ? $attributes["column"] : $this->name;
	}
}
?>